Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/add exact body check option for FullHttpRequestMatcher #158

Conversation

sebastianbuechler
Copy link
Collaborator

@sebastianbuechler sebastianbuechler commented Aug 23, 2023

This PR introduces the ability to require exact body matches in cases of Maps when using the FullHttpRequestMatcher and aims to solve issue #149.

When initiating the DioAdapter it can be specified to use FullHttpRequestMatcher(needsExactBody: true) as matcher parameter. If no value for needsExactyBody is provided then false will be used for default for backwards compatibility.

Additional tests can be found in test/extensions/matches_request_test.dart.

@codecov
Copy link

codecov bot commented Aug 23, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (a03d15b) 99.28% compared to head (71fdaaa) 99.29%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #158   +/-   ##
=======================================
  Coverage   99.28%   99.29%           
=======================================
  Files          24       24           
  Lines         280      282    +2     
=======================================
+ Hits          278      280    +2     
  Misses          2        2           
Files Changed Coverage Δ
lib/src/extensions/matches_request.dart 100.00% <100.00%> (ø)
lib/src/matchers/http_matcher.dart 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@LukaGiorgadze
Copy link
Member

Thank you @sebastianbuechler , this is awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants